<template>
    <div class="flex-row-center base-size mb20 pointer">
        <a class="home_icon" href="https://zhyq.ailuquan.cn/website/shijzslqqzf">首页</a>
        <span class="ml5 mr5">></span>
        <span @click="proxy.routerBackMixin" class="base-color">金融产品</span>
        <span class="ml5 mr5">></span>
        <span class="">详情</span>
    </div> 
    <div>
        <div class="flex-row">
            <el-image style="width: 200px; height: 200px" fit="cover" :src="fileurl+ '/banking/'+ detail.cover">
                        <template #error>
                            <div class="image-slot">
                                <el-image src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"/>
                            </div>
                        </template>
                    </el-image>
            <div class="ml10 flex-column pd10-column">
                <div class="size24 weight mb10">{{detail.name||"暂无标题"}}</div>
                <div class="base-size weight mb10 danger-color">{{detail.price||"88888"}}元</div>
                <div class="flex1"></div>
                <div class="flex-row-center base-gray-size">
                    <span class="mr30">发布时间：{{detail.intime||''}}</span>
                    <span class="mr30">发布人：{{detail.man}}</span>
                    <span>联系方式：{{detail.mobile}}</span>
                </div>
            </div>
        </div>
        <div class="line mt10 mb30"></div>
        <div v-html="detail.msg||'暂无详细内容'"></div>
    </div>
</template>
<script setup>
    import { reactive,ref,getCurrentInstance,toRaw,inject,toRefs } from 'vue'
    let { proxy } = getCurrentInstance()
    let obj = reactive({
        fileurl: proxy.$setting.globalUrl.fileurl,
        detail:{
            id: proxy.$route.query.id
        }
    })

    let init = ()=>{
        proxy.$ajax({url: 'banking/get',data:{banking_id: obj.detail.id},bfLoading: true}).then(d => {
            if(d.success){
                obj.detail = {
                    ...d.msg,
                    id: obj.detail.id
                }
            }else{}
        }).catch(e => {
            console.log(e)
            if(e == "登录已过期，请重新登录"){
                proxy.routerPushMixin('/')
            }
        })
    }
    init()

    let { detail,fileurl } = toRefs(obj)
</script>

<style lang="scss" scoped>
</style>